function Expression(){this.initialize();};Expression.prototype = new YYParser([
	{//State 0
		Default : -1,
		gotos : {
			'Program' : 1
		}
	},
	{//State 1
		actions : {
			'' : 3,
			"-" : 2,
			'BOOL' : 4,
			'ADDP' : 12,
			";" : 7,
			"+" : 5,
			'IDENTITY' : 13,
			'NUM' : 8,
			"(" : 15,
			'MINP' : 9,
			'LITERAL0' : 17,
			'LITERAL1' : 18,
			'REG' : 11
		},
		gotos : {
			'ExprStatement' : 14,
			'AssignmentExpr' : 16,
			'String' : 6,
			'Expr' : 10
		}
	},
	{//State 2
		actions : {
			"-" : 2,
			'BOOL' : 4,
			'ADDP' : 12,
			"+" : 5,
			'IDENTITY' : 13,
			'NUM' : 8,
			"(" : 15,
			'MINP' : 9,
			'LITERAL0' : 17,
			'LITERAL1' : 18,
			'REG' : 11
		},
		gotos : {
			'AssignmentExpr' : 16,
			'String' : 6,
			'Expr' : 19
		}
	},
	{//State 3
		Default : 0
	},
	{//State 4
		Default : -7
	},
	{//State 5
		actions : {
			"-" : 2,
			'BOOL' : 4,
			'ADDP' : 12,
			"+" : 5,
			'IDENTITY' : 13,
			'NUM' : 8,
			"(" : 15,
			'MINP' : 9,
			'LITERAL0' : 17,
			'LITERAL1' : 18,
			'REG' : 11
		},
		gotos : {
			'AssignmentExpr' : 16,
			'String' : 6,
			'Expr' : 20
		}
	},
	{//State 6
		Default : -6
	},
	{//State 7
		Default : -3
	},
	{//State 8
		Default : -5
	},
	{//State 9
		actions : {
			'IDENTITY' : 21
		}
	},
	{//State 10
		actions : {
			"-" : 22,
			"*" : 26,
			";" : 24,
			"+" : 23,
			"/" : 27,
			"," : 25
		}
	},
	{//State 11
		Default : -8
	},
	{//State 12
		actions : {
			'IDENTITY' : 28
		}
	},
	{//State 13
		actions : {
			'ADDP' : 30,
			"=" : 31,
			'MINP' : 29
		},
		Default : -9
	},
	{//State 14
		Default : -2
	},
	{//State 15
		actions : {
			"-" : 2,
			'BOOL' : 4,
			'ADDP' : 12,
			"+" : 5,
			'IDENTITY' : 13,
			'NUM' : 8,
			"(" : 15,
			'MINP' : 9,
			'LITERAL0' : 17,
			'LITERAL1' : 18,
			'REG' : 11
		},
		gotos : {
			'AssignmentExpr' : 16,
			'String' : 6,
			'Expr' : 32
		}
	},
	{//State 16
		Default : -14
	},
	{//State 17
		Default : -24
	},
	{//State 18
		Default : -25
	},
	{//State 19
		Default : -19
	},
	{//State 20
		Default : -20
	},
	{//State 21
		Default : -13
	},
	{//State 22
		actions : {
			"-" : 2,
			'BOOL' : 4,
			'ADDP' : 12,
			"+" : 5,
			'IDENTITY' : 13,
			'NUM' : 8,
			"(" : 15,
			'MINP' : 9,
			'LITERAL0' : 17,
			'LITERAL1' : 18,
			'REG' : 11
		},
		gotos : {
			'AssignmentExpr' : 16,
			'String' : 6,
			'Expr' : 33
		}
	},
	{//State 23
		actions : {
			"-" : 2,
			'BOOL' : 4,
			'ADDP' : 12,
			"+" : 5,
			'IDENTITY' : 13,
			'NUM' : 8,
			"(" : 15,
			'MINP' : 9,
			'LITERAL0' : 17,
			'LITERAL1' : 18,
			'REG' : 11
		},
		gotos : {
			'AssignmentExpr' : 16,
			'String' : 6,
			'Expr' : 34
		}
	},
	{//State 24
		Default : -4
	},
	{//State 25
		actions : {
			"-" : 2,
			'BOOL' : 4,
			'ADDP' : 12,
			"+" : 5,
			'IDENTITY' : 13,
			'NUM' : 8,
			"(" : 15,
			'MINP' : 9,
			'LITERAL0' : 17,
			'LITERAL1' : 18,
			'REG' : 11
		},
		gotos : {
			'AssignmentExpr' : 16,
			'String' : 6,
			'Expr' : 35
		}
	},
	{//State 26
		actions : {
			"-" : 2,
			'BOOL' : 4,
			'ADDP' : 12,
			"+" : 5,
			'IDENTITY' : 13,
			'NUM' : 8,
			"(" : 15,
			'MINP' : 9,
			'LITERAL0' : 17,
			'LITERAL1' : 18,
			'REG' : 11
		},
		gotos : {
			'AssignmentExpr' : 16,
			'String' : 6,
			'Expr' : 36
		}
	},
	{//State 27
		actions : {
			"-" : 2,
			'BOOL' : 4,
			'ADDP' : 12,
			"+" : 5,
			'IDENTITY' : 13,
			'NUM' : 8,
			"(" : 15,
			'MINP' : 9,
			'LITERAL0' : 17,
			'LITERAL1' : 18,
			'REG' : 11
		},
		gotos : {
			'AssignmentExpr' : 16,
			'String' : 6,
			'Expr' : 37
		}
	},
	{//State 28
		Default : -12
	},
	{//State 29
		Default : -11
	},
	{//State 30
		Default : -10
	},
	{//State 31
		actions : {
			"-" : 2,
			'BOOL' : 4,
			'ADDP' : 12,
			"+" : 5,
			'IDENTITY' : 13,
			'NUM' : 8,
			"(" : 15,
			'MINP' : 9,
			'LITERAL0' : 17,
			'LITERAL1' : 18,
			'REG' : 11
		},
		gotos : {
			'AssignmentExpr' : 16,
			'String' : 6,
			'Expr' : 38
		}
	},
	{//State 32
		actions : {
			"-" : 22,
			"*" : 26,
			"+" : 23,
			"/" : 27,
			"," : 25,
			")" : 39
		}
	},
	{//State 33
		actions : {
			"*" : 26,
			"/" : 27
		},
		Default : -16
	},
	{//State 34
		actions : {
			"*" : 26,
			"/" : 27
		},
		Default : -15
	},
	{//State 35
		actions : {
			"-" : 22,
			"*" : 26,
			"+" : 23,
			"/" : 27
		},
		Default : -21
	},
	{//State 36
		Default : -17
	},
	{//State 37
		Default : -18
	},
	{//State 38
		actions : {
			"-" : 22,
			"*" : 26,
			"+" : 23,
			"/" : 27,
			"," : 25
		},
		Default : -23
	},
	{//State 39
		Default : -22
	}
],
                                  
[
	[//Rule 0
		 '$start', 2,undefined
	],
	[//Rule 1
		 'Program', 0,undefined
	],
	[//Rule 2
		 'Program', 2,undefined
	],
	[//Rule 3
		 'ExprStatement', 1,undefined
	],
	[//Rule 4
		 'ExprStatement', 2,
function($_)//line 22 "examples/gnu-expr/Expression.ypj.yp"
{ _output($_[1].value); }
	],
	[//Rule 5
		 'Expr', 1,
function($_)//line 25 "examples/gnu-expr/Expression.ypj.yp"
{ return $_[1].value;  }
	],
	[//Rule 6
		 'Expr', 1,
function($_)//line 26 "examples/gnu-expr/Expression.ypj.yp"
{ return $_[1].value.slice(1,-1);  }
	],
	[//Rule 7
		 'Expr', 1,
function($_)//line 27 "examples/gnu-expr/Expression.ypj.yp"
{ return $_[1].value; }
	],
	[//Rule 8
		 'Expr', 1,
function($_)//line 28 "examples/gnu-expr/Expression.ypj.yp"
{ return $_[1].value  }
	],
	[//Rule 9
		 'Expr', 1,
function($_)//line 29 "examples/gnu-expr/Expression.ypj.yp"
{ return _getval($_[1].value); }
	],
	[//Rule 10
		 'Expr', 2,
function($_)//line 30 "examples/gnu-expr/Expression.ypj.yp"
{ return _scope[$_[1].value]++; }
	],
	[//Rule 11
		 'Expr', 2,
function($_)//line 31 "examples/gnu-expr/Expression.ypj.yp"
{ return _scope[$_[1].value]--; }
	],
	[//Rule 12
		 'Expr', 2,
function($_)//line 32 "examples/gnu-expr/Expression.ypj.yp"
{ return ++_scope[$_[2].value]; }
	],
	[//Rule 13
		 'Expr', 2,
function($_)//line 33 "examples/gnu-expr/Expression.ypj.yp"
{ return --_scope[$_[2].value]; }
	],
	[//Rule 14
		 'Expr', 1,
function($_)//line 34 "examples/gnu-expr/Expression.ypj.yp"
{ return $_[1].value; }
	],
	[//Rule 15
		 'Expr', 3,
function($_)//line 35 "examples/gnu-expr/Expression.ypj.yp"
{ return $_[1].value + $_[3].value; }
	],
	[//Rule 16
		 'Expr', 3,
function($_)//line 36 "examples/gnu-expr/Expression.ypj.yp"
{ return $_[1].value - $_[3].value; }
	],
	[//Rule 17
		 'Expr', 3,
function($_)//line 37 "examples/gnu-expr/Expression.ypj.yp"
{ return $_[1].value * $_[3].value; }
	],
	[//Rule 18
		 'Expr', 3,
function($_)//line 38 "examples/gnu-expr/Expression.ypj.yp"
{
                                  return $_[1].value / $_[3].value;
                                }
	],
	[//Rule 19
		 'Expr', 2,
function($_)//line 41 "examples/gnu-expr/Expression.ypj.yp"
{ return -$_[2].value; }
	],
	[//Rule 20
		 'Expr', 2,
function($_)//line 42 "examples/gnu-expr/Expression.ypj.yp"
{ return $_[2].value; }
	],
	[//Rule 21
		 'Expr', 3,
function($_)//line 43 "examples/gnu-expr/Expression.ypj.yp"
{ return $_[3].value; }
	],
	[//Rule 22
		 'Expr', 3,
function($_)//line 44 "examples/gnu-expr/Expression.ypj.yp"
{ return $_[2].value; }
	],
	[//Rule 23
		 'AssignmentExpr', 3,
function($_)//line 47 "examples/gnu-expr/Expression.ypj.yp"
{return _assign($_[1].value, $_[3].value);}
	],
	[//Rule 24
		 'String', 1,undefined
	],
	[//Rule 25
		 'String', 1,undefined
	]
]);
Expression.prototype.Lexer = function(){var tok;if(tok = this._source.match(/^([0-9]+(?:\.[0-9]+)?)/g)){tok[0]=parseFloat(tok[0]);this._source = this._source.replace(/^([0-9]+(?:\.[0-9]+)?)/g,'');return{id:'NUM',value:tok[0]};}if(tok = this._source.match(/^\true|\false(?!\w)/g)){this._source = this._source.replace(/^\true|\false(?!\w)/g,'');return{id:'BOOL',value:tok[0]};}if(tok = this._source.match(/^\"([^\"\\]|(\\.))*\"/g)){this._source = this._source.replace(/^\"([^\"\\]|(\\.))*\"/g,'');return{id:'LITERAL0',value:tok[0]};}if(tok = this._source.match(/^\'([^\'\\]|(\\.))*\'/g)){this._source = this._source.replace(/^\'([^\'\\]|(\\.))*\'/g,'');return{id:'LITERAL1',value:tok[0]};}if(tok = this._source.match(/^\+\+/g)){this._source = this._source.replace(/^\+\+/g,'');return{id:'ADDP',value:tok[0]};}if(tok = this._source.match(/^\-\-/g)){this._source = this._source.replace(/^\-\-/g,'');return{id:'MINP',value:tok[0]};}if(tok = this._source.match(/^[a-zA-Z\_\$][\w$]*/g)){this._source = this._source.replace(/^[a-zA-Z\_\$][\w$]*/g,'');return{id:'IDENTITY',value:tok[0]};}};
var _scope = {};

function _assign(id,val){
	return (_scope[id] = val);
}

function _getval(id){
	return _scope[id];
}

function _output(value){
	output.value += "\n" + value;
}
